Field of the Invention
The present invention relates to event driven data processing and more particularly to a subscription notification framework providing event handling and event notification dependent upon event subscriptions.
Description of the Related Art
In computer programming, event-driven programming or event-based programming is a programming paradigm in which the flow of the program is determined by events such as sensor outputs or user actions including mouse clicks and key presses, or messages from other programs or threads of execution. Event-driven programming can also be defined as an application architecture technique in which the application has a main loop which is clearly divided down to two sections—the first being event selection or event detection and the second being event handling. Event driven data processing differs from event driven programming in that in event driven data processing, actions taken in response to events need not be program flow actions, but merely any programmatic action including those actions as simple as merely recording the occurrence of a detected event.
Event driven data processing can range from single object event handling in which all events relate to the subject of a single programmatic object, to multi-object event handling in which different events relate to different subjects of respectively different programmatic objects. In traditional single object event driven data processing, events are detected and passed into an event loop and within the event loop, each event is matched to a handler and processed accordingly. In more complex multi-object event driven data processing, different subscriptions can be managed for different objects such that subscribers receive events for handling only when the events pertain to objects for which the subscriber has subscribed. Thus, for each received event, first a corresponding object must be determined for which the event pertains, second, only those subscriptions pertaining to the corresponding object are selected, and third, the selected subscriptions receive notification of the event.
In the multi-object event data processing context, two common methodologies for processing events are preferred. In a first methodology, events are processed essentially in real time sequentially as the events occur. As such, the processing of events in sequence can be resource intensive computationally speaking as the subscriptions for the events first must be determined before providing notice of the events to the subscribers corresponding to the determined subscriptions. In a second methodology, events are processed in batch mode so as to avoid taxing computing resources at less than desirable times of the day. However, in processing events in batch mode, the timely handling of events can be compromised in exchange for the reduction in resource consumption.